Strategies for Stable Merge Sorting

نویسندگان

  • Samuel R. Buss
  • Alexander Knop
چکیده

We introduce new stable, natural merge sort algorithms, called 2-merge sort and α-merge sort. We prove upper and lower bounds for several merge sort algorithms, including Timsort, Shiver’s sort, α-stack sorts, and our new 2-merge and α-merge sorts. The upper and lower bounds have the forms c · n logm and c · n logn for inputs of length n comprising m runs. For Timsort, we prove a lower bound of (1.5−o(1))n logn. For 2-merge sort, we prove optimal upper and lower bounds of approximately (1.089±o(1))n logm. We prove similar asymptotically matching upper and lower bounds for α-merge sort, when φ < α < 2, where φ is the golden ratio. These merge strategies can be used for any stable merge sort, not just natural merge sorts. The new 2-merge and α-merge sorts have better worst-case merge cost upper bounds and are slightly simpler to implement than the widely-used Timsort; they also perform better in experiments.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A New Sorting Algorithm for Accelerating Join-based Queries

The performance of several Database Management Systems (DBMSs) and Data Stream Management Systems (DSMSs) queries is dominated by the cost of the sorting algorithm. Sorting is an integral component of most database management systems. Stable sorting algorithms play an important role in DBMS queries since such operations requires stable sorting outputs. In this paper, we present a new stable sor...

متن کامل

OzSort 2.0: Sorting up to 252GB for a Penny

We present OzSort 2.0, a stable external merge sort software optimized for the requirements of PennySort Indy 2010. OzSort 2.0 is engineered to better exploit multi-core processors over its predecessor, and to further minimize cache misses. In this paper, we explain the workings of OzSort 2.0 and show how we sorted up to 252GB (2 516 582 400 records) for a Penny (< 1929s) using standard desktop...

متن کامل

Knitting Sort: A Novel Stable and Inplace Sorting Technique (An Extension of Exchange Sorting with Bitonic Sorting Network)

One of the most frequent operations performed on database is searching. To perform this operation we have different kinds of searching algorithms, some of which are Binary Search, Linear Search, Quadratic search[1], but these and all other searching algorithms work only on data, which are previously sorted. An efficient algorithm is required in order to make the searching algorithm fast and eff...

متن کامل

Fast Stable Merging and Sorting in Constant Extra Space

In an earlier research paper, we presented a novel, yet straightforward linear-time algorithm for merging two sorted lists in a fixed amount of additional space. Constant of proportionality estimates and empirical testing reveal that this procedure is reasonably competitive with merge routines free to squander unbounded additional memory, making it particularly attractive whenever space is a cr...

متن کامل

Sorting On A Graphics Processing Unit(GPU)

2.1 Graphics Processing Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 2.2 Sorting Numbers on GPUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 2.2.1 SDK Radix Sort Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 2.2.1.1 Step 1–Sorting tiles ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • CoRR

دوره abs/1801.04641  شماره 

صفحات  -

تاریخ انتشار 2017